<!-- DETAILS panel -->
 

   <? if ($is_pocketpc) {
		  if (my_content_type($filename)=="txt") { 
		       
			  // print $edit;
			   
			   if ($edit=="t") { 
			   
$path_to_load = $mfile==""?$filename:$mfile;
$path_to_load = str_replace( "~", "=",$path_to_load );
			   
					$fcontents  = implode ('', file ($path_to_load)); 
					$fcontents  = str_replace( "&", "&amp;",$fcontents);
					$fcontents  = str_replace( "<", "&lt;",$fcontents);
					$fcontents  = str_replace( ">", "&gt;",$fcontents) ;
					$fcontents  = stripslashes( $fcontents) ;
					?>
					<a href="javascript:fb_edit('e', 'b', 'mfile', '')">Exit edit mode</a> 
					<br>
					<textarea wrap="off" rows="20" cols="70"><?= $fcontents ?></textarea>
					
					
					
					<? } else { ?>
				   <a href="javascript:fb_edit('e', 't', 'r', 'on')">Edit this file</a>  
					<? } ?>
			   
	   <? }
      } ?>			
<? if ($_GET["pv"]=="") {
	$short = filetitle($filename);  
	if (array_key_exists($short,$metadata)) { 
		if (is_array($metadata[$short])) {
			$rssdata = $metadata[$short];
			$fd = $rssdata["date"];
			$fs = $rssdata["size"];  
			// $ft = $rssdata["type"];  
			$rss_description = $rssdata["description"];  
			$short = $rssdata["title"]; 
		} else {
			parse_str($metadata[$short]);
			$fd = $date;
			$fs = $size;  
			$ft = $type;  
		}
	}
	
	$ico = "pu";
	$ico=$ft=="mpg"?"po":$ico;
	$ico=$ft=="nsv"?"pw":$ico;
	$ico=$ft=="mp3"?"pw":$ico;
	$ico=$ft=="ram"?"py":$ico;


 ?>
    	 
	<div align="left" >
	<table cellspacing="0" cellpadding="0" id="infotable" <? if ($is_pocketpc) { ?>width="100%"<? } ?>>
	  <tr>
		 <td valign="top">
		 <? if ($is_pocketpc) {
			 $window_height_offset=210; ?> 
			   <div align=center style="width:100%;background-color:white;">
						<? if (!$is_blackberry) { ?>
			   <font color="gray"><?= $this_folder->pimp_foldername ?></font><br>
						<? } ?>
				 <!-- control panel -->
			   <? if ($edit=="b") { ?>
				   <? if (strlen($filename)>0) {
						$param=$is_blackberry?"w=240&fo=wbmp":"w=240";
						if ($is_media) $param="h=132"; ?>
						<img src="thumbnail.php?i=<?= $filename ?>&<?=$param?>" border="1" id=mainpic> 
						<br>
						
						<? if ($_GET["slide"]=="ok") { 
						      include ("dsp_slide_scripts.php");
							  print "<br><a href=\"javascript:fb_edit('slide','')\">Close</a>";
						   } else { ?>
							<a href="<?= $href ?>?i=<?= $i?>&e=b&d=<?= $dirname ?>&f=<?= $f-1 ?>"><img border='0' src="<?= $href ?>?i=pc"></a>
							<a href="<?= $href ?>?i=<?= $i?>&e=b&d=<?= $dirname ?>&f=<?= $f+1 ?>"><img border='0' src="<?= $href ?>?i=pd"></a>
							<br><?= $f+1 ?> of <?= count($this_folder->pimp_files) ?>&nbsp;<a href="javascript:fb_edit('slide','ok')">Slides</a><br> 
						<? } ?> 
						
						<? if ($is_blackberry&&(strlen($this_folder->pimp_parentfolder)>0)) { ?>
						<a href="<?= $href ?>?i=<?= $i?>&e=b&d=<?= $this_folder->pimp_parentfolder ?>&bkb=<?= $bkb ?>"
						 ><font color='gray'>Up to parent</font></a>
						<? } ?>
				   <? } else {?>
				   No files in this folder
				   <? } ?> 
			   <? } ?> 
			   </div>  
		 <? } else if (my_content_type($filename)=="mpg") { 
			   $window_height_offset=245; 
			   if ($page_file["description"]!="") print "<div style='width:300'>".$page_file["description"]."</div>";
			  
			  addMediaContainer ($filename) ;
			   
			  include ("dsp_ms_player_scripts.php"); 
		  } else if ($ft=="nsv") { 
			 addMediaContainer ($filename,$ft,$mw,$mh) ;
			 $window_height_offset=$mh+5; 
		  } else if ($ft=="ram") {  ?>
			 <table>
				<tr>
				   <td><? addMediaContainer ($filename,$ft,$mw,$mh) ;?></td>
				</tr>
			   <tr>
			   <td colspan="2" bgcolor="#CCCCFF">
				   <div id="dprogpic" style="width:100%;height:10;border:inset 1px;background-color:aliceblue"
				   ><img src="<?= $href ?>?i=a" width="1" height="10" id=progpic></div>
			   </td>
			 </tr>
			 </table> <?  
			  include ("dsp_rm_player_scripts.php"); 
			 $window_height_offset=$mh+5;
		  } else { 
			 $window_height_offset=210; ?> 
			<img src="gen.jpg" border="1" id=mainpic>
		 <? }  			
				$info = pathinfo($filename);
				$extension = strtolower($info["extension"]);
			?>
			
			<? if ($is_pocketpc) { ?>
			<br>
			<? } else { ?>
			
		 </td>
		 <td valign="top" class="padded" id="tdfileinfo" style="" nowrap>  
			<? include ("dsp_player_controls.php"); ?>  
			<? } ?>
		 
		 <!-- <div align=right style="font-family:webdings;cursor:hand" onclick="tdfileinfo.style.display='none'">r</div> -->
			
			<? if (!$is_blackberry) { ?><img align="absmiddle" src="<?= $href ?>?i=<?= $ico ?>"><? } ?>
			<? if ( $is_pocketpc&&( ($extension=="wmv")||($extension=="asf") ) ) { ?>
			<a href="makeasx.php?i=<?= $filename ?>" style="color:#009900"><b><u><?= $short ?></u></b></a><br> 
			<? } else { ?>
			<a href="<?= $filename ?>" target="_blank" style="color:#0000FF"><b><u><?= $short ?></u></b></a><br>
			<? } ?>
			<!-- -->
			Size: <?= number_format( $fs/1000, 0, "",",") ?>Kb<br>
			Type: <?= $ft ?><br>
			Date Last Modified: <br><?= $fd ?><br>
			
			<? if ($is_blackberry) { ?>
			    <? if ($showlist) { ?>
				<a href="<?= $href ?>?i=<?= $i?>&e=b&v=d&d=<?= $dirname ?>&f=<?= $f ?>" style="color:#FF0000 ">Hide List</a>
				<? } else { ?>
				<a href="<?= $href ?>?i=<?= $i?>&e=b&v=d&d=<?= $dirname ?>&f=<?= $f ?>&sl=on" style="color:#FF0000 ">Show List</a>
				<? } ?>
			<? } else { ?>
			    <? if ($showlist) { ?>
				<a href="javascript:fb_edit('sl','')" style="color:#FF0000 ">Hide List</a>
				<? } else { ?>
				<a href="javascript:fb_edit('sl','on')" style="color:#FF0000 ">Show List</a>
				<? } ?>
			<? } ?>
			
		 </td>
	  </tr>
	</table>
	</div>
<? } else {
    $window_height_offset = 10;
} ?>
<!--
<div id=splitterinfo class='splitter_Dx_X' style='position:absolute;top:0;left:0;background-color:blue'></div> -->